package com.base.springboot.starter.web.controller;

import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 前端控制器
 *
 * @author admin
 * @since 2020-08-20
 */
@RestController
public class IndexController {
    @Resource
    private Environment environment;

    @GetMapping("/")
    public String index() {
        return environment.getProperty("spring.application.name") + " profiles " + environment.getProperty("spring.profiles.active") + " active...";
    }
}